home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml"/>
- <xsl:template match="/">
- <html>
- <head><title>Invoice view 1</title>
- </head>
- <body>
- <div align="right">
- <h1>INVOICE</h1>
- </div>
- <table align="right" border="1" width="20%" bordercolor="black" cellpadding="5" cellspacing="0">
- <tr>
- <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DATE</b></font></td><td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>INVOICE #</b></font></td>
- </tr>
- <tr>
- <td><xsl:apply-templates select="/invoice/header/date"/></td><td><xsl:apply-templates select="/invoice/header/invoiceNumber"/></td>
- </tr>
- </table>
-
- <table width="50%" cellspacing="2" cellpadding="3" >
- <tr bgcolor="#000066">
- <td><font face="Verdana, Arial, Helvetica, sans-serif" color="white" size="3"><b>Bill To:<xsl:apply-templates select="/invoice/header/billTo/name"/></b></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><xsl:apply-templates select="/invoice/header/billTo/address"/></td>
- </tr>
- </table>
-
- <hr color="#000066" size="5">
- </hr>
- <table width="90%" cellspacing="2" cellpadding="3" bgcolor="#eeeeee">
- <tr bgcolor="#000066">
- <td><font face="Verdana, Arial, Helvetica, sans-serif" color="white" size="3"><b>Quantity</b></font></td>
- <td><font face="Verdana, Arial, Helvetica, sans-serif" color="white" size="3"><b>Description</b></font></td>
- <td><font face="Verdana, Arial, Helvetica, sans-serif" color="white" size="3"><b>Rate</b></font></td>
- <td><font face="Verdana, Arial, Helvetica, sans-serif" color="white" size="3"><b>Amount</b></font></td>
-
- </tr>
- <xsl:apply-templates select="/invoice/item"/>
- <tr>
- <td></td>
- <td></td>
- <td><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><b>TOTAL</b></font></td>
- <td><xsl:value-of select="sum(//extPrice)"/></td>
- </tr>
- </table>
-
- </body>
- </html>
- </xsl:template>
-
-
- <xsl:template match="street1|city|state|zip">
- <i><xsl:apply-templates/></i>
- <br/>
- </xsl:template>
-
- <xsl:template match="item">
- <!--
- <qty e-dtype = "int">2</qty>
- <unit>ea</unit>
- <description>workgroup switch</description>
- <sku e-dtype = "string">6754231</sku>
- <price e-dtype = "fixed.14.4">1299.00</price>
- <discount e-dtype = "r4">.10</discount>
- <extPrice e-dtype = "fixed.14.4">2338.20</extPrice>
- -->
- <tr>
- <td><xsl:apply-templates select="qty"/></td>
- <td><xsl:apply-templates select="description"/></td>
- <td><xsl:apply-templates select="price"/>
-
- <xsl:if test="discount!=''">
- (discount of <xsl:value-of select="substring(discount,2,2)"/>%)
- </xsl:if>
-
- </td>
- <td><xsl:apply-templates select="extPrice"/></td>
- </tr>
- </xsl:template>
-
-
- </xsl:stylesheet>
-